import { Canvas, Meta, Source } from '@storybook/blocks'

import { PrimitiveDocsButton } from '../../storybook-utils/primitive-docs-button'
import * as DrawerStories from './drawer.stories'

<Meta of={DrawerStories} />

<PrimitiveDocsButton docsUrl='https://github.com/emilkowalski/vaul' />

# Drawer

A drawer component for React.

## Preview

<Canvas of={DrawerStories.Default} />

## Usage

export const importCode = `import {
  Drawer,
  DrawerClose,
  DrawerContent,
  DrawerDescription,
  DrawerFooter,
  DrawerHeader,
  DrawerTitle,
  DrawerTrigger,
} from "@orbitkit/ui/drawer";`

export const usageCode = `<Drawer>
  <DrawerTrigger>Open</DrawerTrigger>
  <DrawerContent>
    <DrawerHeader>
      <DrawerTitle>Are you absolutely sure?</DrawerTitle>
      <DrawerDescription>This action cannot be undone.</DrawerDescription>
    </DrawerHeader>
    <DrawerFooter>
      <Button>Submit</Button>
      <DrawerClose>
        <Button variant="outline">Cancel</Button>
      </DrawerClose>
    </DrawerFooter>
  </DrawerContent>
</Drawer>`

<Source code={importCode} language='ts' dark />
<Source code={usageCode} language='tsx' dark />
